/*
 * Copyright 2007-2009 Perttu "celeron55" Ahola <celeron55@gmail.com>
 *
 * This file is part of jukumagic.
 *
 * jukumagic is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * jukumagic is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with jukumagic.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef CUT_H_
#define CUT_H_

#include "common.h"
#include "jukuobject.h"
#include "footprint.h"

class Cut : public JukuObject
{
public:
	BoardPoint m_pos;
	Cut();
	~Cut();
    JukuObjectType GetType(){ return TYPE_CUT; }
	const wxChar * GetShortString(void){return NULL;}
	const wxChar * GetTypeString(void){return _("Cut");}
	void WriteXML(TiXmlNode* root);
	static JukuObject* ReadFromXMLElement(TiXmlElement* element);
	void Draw(wxDC &dc, wxWindow *window, wxPoint origin);
	BoardRect GetDrawArea();
	
	BoardPoint GetBoardPos();
	void SetBoardPos(BoardPoint p);
	void Move(int dx, int dy);

	bool IsSelectedInPoint(int x, int y);
	bool IsSelectedInArea(int x1, int y1, int x2, int y2, bool touch_is_enough);

	//void SetSelected(bool selected);

	void Rotate(TurnDirection dir, BoardPoint origin);
	
	BoardRect GetPinExtents();
};

#endif
